﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="userCenter.aspx.cs" Inherits="ProjectX.userCenter" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>用户中心</title>
    <link href="/WebCss/base.css" rel="stylesheet" type="text/css" />
    <link href="/WebCss/skins/Ext/asyncbox.css" rel="stylesheet" type="text/css" />
    <script src="/ClientJs/jquery.js" type="text/javascript"></script>
    <script src="/ClientJs/AsyncBox.js" type="text/javascript"></script>
    <script src="/ClientJs/userCenter.js" type="text/javascript"></script>
    <style type="text/css">
        #main
        {
            width:998px;
            margin:0 auto;
        }
        .msgdiv
        {
            width:756px;
            float:left;
            margin-top:10px;
            margin-left:50px;
        }
        .title_div
        {
            width:100px;
            text-align:right;
            float:left;
            height:33px;
            line-height:35px;
            margin-right:10px;
            color:#FF6600;
        }
        .contentdiv
        {  
            border:1px solid #dddddd;    
            padding:20px;  
        }
        #userMenu
        {
            width:180px;
            margin-top:10px;
            margin-left:10px;
            float:left;
        }
        #userMenu .current
        {
            background:url("/Webimg/usermenu.png") no-repeat 0 0;
        }
        #userMenu li
        {
            width:165px;
            height:32px;
            line-height:30px;
            margin-bottom:3px;
            background:url("/Webimg/usermenu.png") no-repeat 0 -32px;
        }

        .current a
        {
            color:#FFFFFF;    
        }
        .selltitle
        {
            text-align:center;
            background:url("/Webimg/title.png") no-repeat 0 0;
            height:29px;
            width:200px;
            line-height:29px;
            float:left;
            margin-right:5px;
            color:White;
        }     
    </style>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#mainpage").hover(function () { $(this).addClass("mainActive"); }, function () { $(this).removeClass("mainActive"); });
            $("#buy").hover(function () { $(this).addClass("buylinkactive"); }, function () { $(this).removeClass("buylinkactive"); });
            $("#mybuy").hover(function () { $(this).addClass("mybuylinkactive"); }, function () { $(this).removeClass("mybuylinkactive"); });
            $("#allbuy").hover(function () { $(this).addClass("allbuylinkactive"); }, function () { $(this).removeClass("allbuylinkactive"); });
        });
    </script>
</head>
<body>
    
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
        <div id="headTop">
            <p>
                <asp:HyperLink ID="username" runat="server" NavigateUrl="/userCenter.html" ForeColor="Red"></asp:HyperLink>&nbsp&nbsp&nbsp欢迎来到淘我想淘网！
                <strong>
                    <asp:HyperLink ID="loginlink" runat="server" NavigateUrl="/login.html" ForeColor="White">[请登录]</asp:HyperLink>&nbsp<font color="red">|</font>&nbsp<asp:HyperLink ID="reglink" runat="server" NavigateUrl="/regedit.html" ForeColor="White">[免费注册]</asp:HyperLink>
                    <asp:LinkButton ID="logout" runat="server" ForeColor="White" 
                    Visible="false" onclick="logout_Click">[退出]</asp:LinkButton>
                </strong>
                <span>
                    <a href="/userCenter.html" target="_self" style="color:White">[用户中心]</a>&nbsp<font color="red">|</font>&nbsp[帮助中心]
                </span>
            </p>
        </div>
        <div id="newHeader" >
            <div>
                <a href="/" class="logo hidetxt"></a>
            </div>
            <ul id="newNav">
                <li><a id="mainpage" href="/" target="_parent" class="mainlink"></a></li>
                <li><a id="buy" href="/buy.html" target="_parent" class="buylink"></a></li>
                <li><a id="mybuy" href="/mybuy.html"  target="_parent" class="mybuylink"></a></li>
                <li><a id="allbuy" href="/allbuy.html"  target="_parent" class="allbuylink"></a></li>
            </ul>
        </div>
        
        <div id="main" class="clearfix">
            <div id="userMenu">
                <ul>
                    <li id="base" class="current"><a href="javascript:getusermsg(1)">> 基本信息</a></li>
                    <li id="pass"><a href="javascript:getusermsg(2)">> 修改密码</a></li>
                </ul>
            </div>
            <div id="basemsg" class="msgdiv">
                <div style="text-align:left">
                    <ul style="border-bottom: 2px solid #5CB7E5;height:29px;" >
                        <li class="selltitle">
                            <h4>基本信息</h4>
                        </li>
                    </ul>
                </div>
                <div class="contentdiv">
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                    <asp:FormView ID="userView" runat="server" Width="100%" 
                            onitemcommand="userView_ItemCommand" ondatabound="userView_DataBound">
                        <ItemTemplate>
                                <div class="clearfix">
                                    <div class="title_div">
                                        用户名
                                    </div>
                                    <div style="float:left;height:33px;line-height:35px;">
                                        <%# Eval("userName")%>
                                    </div>
                                </div>
                                <div class="clearfix">
                                    <div class="title_div">
                                        注册日期
                                    </div>
                                    <div style="float:left;height:33px;line-height:35px;">
                                        <%# Eval("registerDate", "{0:yyyy-MM-dd HH:mm:ss}")%>
                                    </div>
                                </div>
                                <div class="clearfix">
                                    <div class="title_div">
                                        用户积分
                                    </div>
                                    <div style="float:left;height:33px;line-height:35px;">
                                        <asp:HiddenField ID="userpoint" runat="server" Value=<%# Eval("userpoint") %> />
                                        <%# Eval("userpoint") %>分&nbsp&nbsp&nbsp<asp:LinkButton ID="getpoint" runat="server" CommandName="addpoint" Visible="false">领取积分</asp:LinkButton>
                                    </div>
                                </div>
                                <div class="clearfix">
                                    <div class="title_div">
                                        邮箱
                                    </div>
                                    <div style="float:left;">
                                        <input id="emailbox" type="text" style="width:200px;" class="maintextcss" value='<%# Eval("email")%>' />
                                    </div>
                                </div>
                                <div class="clearfix">
                                    <div class="title_div">
                                        淘宝账号
                                    </div>
                                    <div style="float:left;">
                                        <input id="tbname" type="text" style="width:200px;" class="maintextcss" value='<%# Eval("Tbname")%>' />
                                        <span style="color:#666">绑定淘宝账号后，您可以享受本站提供的优惠价格</span>
                                    </div>
                                </div>
                                <div style="margin-top:10px;padding-left:112px;text-align:left;">
                                    <img src="/Webimg/tijiao.png" onclick="updateuser()" alt="" style="cursor:pointer;vertical-align:middle;" />
                                    <span style="color:Red;display:none;" id="usererrmsg"></span>
                                </div>
                        </ItemTemplate>
                    </asp:FormView>
                    </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="userView" EventName="ItemCommand" />
                        </Triggers>
                    </asp:UpdatePanel>
                </div>
            </div>
            <div id="passdiv" class="msgdiv" style="display:none;">
                <div style="text-align:left">
                    <ul style="border-bottom: 2px solid #5CB7E5;height:29px;" >
                        <li class="selltitle">
                            <h4>修改密码</h4>
                        </li>
                    </ul>
                </div>
                <div class="contentdiv">
                    <div class="clearfix">
                        <div class="title_div">
                            原始密码<font color="red">*</font>
                        </div>
                        <div style="float:left;">
                            <asp:TextBox ID="oldpassText" runat="server" TextMode="Password" CssClass="maintextcss" Columns="30" ></asp:TextBox>
                        </div>
                    </div>
                    <div class="clearfix">
                        <div class="title_div">
                            新密码<font color="red">*</font>
                        </div>
                        <div style="float:left;">
                            <asp:TextBox ID="newpassText" runat="server" TextMode="Password" CssClass="maintextcss" Columns="30" ></asp:TextBox>
                        </div>
                    </div>
                    <div class="clearfix">
                        <div class="title_div">
                            重复密码<font color="red">*</font>
                        </div>
                        <div style="float:left;">
                            <asp:TextBox ID="repassText" runat="server" TextMode="Password" CssClass="maintextcss" Columns="30" ></asp:TextBox>
                        </div>
                    </div>
                    <div style="margin-top:10px;padding-left:112px;text-align:left;">
                        <img src="/Webimg/tijiao.png" onclick="updatepass()" alt="" style="cursor:pointer;vertical-align:middle;" />
                        <span style="color:Red;display:none;" id="errmsg"></span>
                    </div>
                </div>
            </div>
        </div>
    </form>
    <iframe id="Ifooter" style="border: 1px solid #DDD;margin-top:30px;margin-bottom:30px;" width="1000px" height="270px" src="footer.aspx" scrolling="no"></iframe>
</body>
</html>
